public class Solution2275 {
    public int largestCombination(int[] candidates) {
        int ans=0;
        for (int i=0;i<32;i++){
            int t=0;
            for (int candidate : candidates) {
                if ((candidate&(1<<i))>0){
                    t++;
                }
            }
            ans=Math.max(ans,t);
        }
        return ans;
    }

    public static void main(String[] args) {
        System.out.println(new Solution2275().largestCombination(new int[]{16,17,71,62,12,24,14}));
    }
}
